package com.shuker.design.abstarct.impl;

import com.shuker.design.abstarct.CacheService;
import com.shuker.design.abstarct.factory.RedisUtils;

import java.util.concurrent.TimeUnit;

/**
 * @author ：Shuker
 * @date ：Created in 2022/1/11 17:14
 * @description：
 * @version:
 */
public class CacheServiceImpl implements CacheService {
    private RedisUtils redisUtils = new RedisUtils();

    @Override
    public String get(String key) {
        return redisUtils.get(key);
    }

    @Override
    public void set(String key, String value) {
        redisUtils.set(key, value);
    }

    @Override
    public void set(String key, String value, long timeout, TimeUnit timeUnit) {
        redisUtils.set(key, value, timeout, timeUnit);
    }

    @Override
    public void del(String key) {
        redisUtils.del(key);
    }
}
